#ifndef CLIENTWIDGET_H
#define CLIENTWIDGET_H

#include <QWidget>
#include <QString>
#include <QFile>
#include <QFileInfo>
#include <QByteArray>
#include <QProgressDialog>

#include <QTcpServer>
#include <QTcpSocket>

#include <QMutex>
#include <QMetaType>
#include <QDebug>

#include "download.h"

QT_BEGIN_NAMESPACE
namespace Ui { class ClientWidget; }
QT_END_NAMESPACE

class ClientWidget : public QWidget
{
    Q_OBJECT
public:
    QTcpSocket *sockfd_;
    QString ip_;
    QString port_;
public:
    ClientWidget(QWidget *parent = nullptr);
    ~ClientWidget();

private slots:
    void on_connectpushButton_clicked();

    void on_IP_Edit_editingFinished();

    void on_uploadpushButton_clicked();

    void on_lineEdit_editingFinished(); //port

    void readmsg_up();

    void on_downloadpushButton_clicked();

    void on_listpushButton_clicked();

private:
    Ui::ClientWidget *ui;
    download *load;
};
#endif // CLIENTWIDGET_H
